package com.zlsx.androidutil;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.zlsx.androidutil.androidutil.UtilActivity;
import com.zlsx.androidutil.androidview.ViewActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {

    @BindView(R.id.view_button)
    Button viewButton;
    @BindView(R.id.util_button)
    Button utilButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.view_button, R.id.util_button})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.view_button:
                startActivity(new Intent(MainActivity.this, ViewActivity.class));
                break;
            case R.id.util_button:
                startActivity(new Intent(MainActivity.this, UtilActivity.class));
                break;
        }
    }
}
